# ------------------
# Public variables
CSC ?= gmcs
MONO ?= mono
PYTHON ?= python

CSC_FLAGS ?= -checked+ -debug+ -warn:4 -warnaserror+ -d:DEBUG -d:TRACE -d:CONTRACTS_FULL

# ------------------
# Internal variables
dispatch := Intersects8
app := ../../bin/ftest/test8.exe

dummy1 := $(shell mkdir ../../bin/ftest 2> /dev/null)

# ------------------
# Primary targets
all: $(app)

run: $(app)
	$(MONO) --debug $(app)

$(dispatch).cs: ../../multimethod.py
	$(PYTHON) ../../multimethod.py --name=$(dispatch) --arg=Shape:lhs --arg=Shape:rhs --result=bool

$(app): $(dispatch).cs *.cs
	$(CSC) -out:$(app) $(CSC_FLAGS) -target:exe *.cs
